package Error;

import java.util.ArrayList;

import interfaces.ErrorReport;
import Language.Language;

/**
 * Error detailing any characters that could not be
 * inserted into a file, due to missing tablefile entries.
 * 
 * @author Tobias Edin
 */
public class InsertError implements ErrorReport {
	private ArrayList<String> missing;
	ErrorType type;
	
	public InsertError(ArrayList<String> missing, ErrorType type) {
		this.missing = missing;
		this.type = type;
	}
	@Override
	public String getErrorMessage() {
		String message = Language.missingCharIntable;
		
		for (String s : missing) {
			message += " [" + s + "]";
		}
		
		return message;
	}

	@Override
	public ErrorType getType() {
		return type;
	}

}
